<!-- 搜索列表 -->
<template>
   <sdyHeader title="啥都有" class="box"></sdyHeader>
    <div class="sdy-search-list">
        <ul>
            <li
            v-for="item in searchList"
            :key="item.proid">{{item.brand}}
            <div>
                <span>{{item.brand}}</span>
                <span>{{item.category}}</span>
            </div>
        </li>
        </ul>
    </div>
</template>
<script setup lang="ts">
import { inject } from 'vue';
// 引入ts接口
import type{ MyHotItem} from '@/config/interface'
const searchList = inject<MyHotItem[]>('searchList')
console.log(searchList);

</script>
<style scoped lang="scss">

.sdy-search-list{
    margin-top: 10px;
    font-size: 15px;
    >ul{
        >li{  
            padding-left: 20px;
            height: 40px;
            border-bottom: 5px solid rgb(253, 253, 254);
            line-height: 40px;
            display: flex;
            justify-content: space-between;
            >div{
                margin-right: 50px;
                display: flex;
                justify-content: space-between;
                align-items: center;
                height: 30px;
                overflow: hidden;
                >span{
                    display: block;
                    padding: 0 10px;
                    margin-right: 10px;
                    border-radius: 3px;
                    background-color: rgb(240, 242, 245);
            }
            }     
    }
    }
    
}
</style>